-
Notifications
You must be signed in to change notification settings - Fork 17
Ethernet Test: Dynamic Interface Detection and Robust CI Validation #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
f0306d8
to
f9a20c2
Compare
797cc1c
to
c74bdc2
Compare
…nd ping validation - Add logic to auto-detect active Ethernet interface using ip/ipconfig - Enhance bring-up sequence with retries and logging - Improve ping test error handling and reporting - Refactor for better CI diagnostics Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
c74bdc2
to
15ce842
Compare
if [ -z "$ETH_IFACES" ]; then | ||
log_warn "No Ethernet interfaces detected." | ||
echo "No Ethernet interfaces detected." >> "$summary_file" | ||
echo "$TESTNAME SKIP" > "$res_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it not a failure if /sys/class/net/ is not having any ethernet interfaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it not a failure if /sys/class/net/ is not having any ethernet interfaces
Reason for SKIP:
If the device or platform does not have any Ethernet hardware (i.e., a WiFi-only board, or platform without an Ethernet PHY/port), marking the test as FAIL is misleading—it’s not a test failure, but a non-applicable scenario.
Test Meaning:
SKIP means “test was not applicable or could not be performed due to missing prerequisites.”
FAIL means “test was run, prerequisites were met, but the result did not match expectations.”
|
||
if ! is_interface_up "$iface"; then | ||
log_warn "$iface is DOWN, skipping" | ||
echo "$iface: SKIP (down/no cable)" >> "$summary_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see an entry to check the cable aswell.
Do you think it is required to add that aswell
sh-5.2# cat /sys/class/net/eth0/carrier
0
0 - if cable is not present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see an entry to check the cable aswell. Do you think it is required to add that aswell sh-5.2# cat /sys/class/net/eth0/carrier 0 0 - if cable is not present
As far as I know, it is not needed. Lava CI debugging is happening only on the serial logs, and no other device logs will be seen. The stdout is sufficient for debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can save additional logs if required. This is done over networks, so if there is no network it won't work. Example here https://github.com/Linaro/test-definitions/blob/master/automated/utils/upload-to-artifactorial.sh
I'd say if the additional debugging is helpful for manual testing it should be kept.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What additional logs are required for debugging? I can save them to the location. If dmesg logs are sufficient to debug the initial failures, which are already available in the job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no mandatory requirement. Additional debug should be something useful from your pov or sth requested by maintainers. What I'm trying to say is that you can include the $summary_file
in the code. There is no harm doing that. If it's not used in LAVA that's OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The summary_file
will still be available, it is not being removed. We can capture everything needed from network maintainers to log into the summary based on the requirements.
This PR enhances the Ethernet validation script:
These changes make the Ethernet test more portable and robust across diverse hardware and build environments.